/**
 * ComponentDetailsService.java
 *
 * Copyright (c) 2009 viorelt All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of viorelt .
 **/
package ro.prjmanager.service;

import ro.prjmanager.core.service.AbstractService;
import ro.prjmanager.core.service.Service;
import ro.prjmanager.dao.ComponentDetailsDao;
import ro.prjmanager.model.ComponentDetails;

import java.util.List;

public class ComponentDetailsService  extends AbstractService<ComponentDetails,Integer> implements Service<ComponentDetails,Integer> {




    public ComponentDetailsDao getDao() {
        return (ComponentDetailsDao) dao;
    }
   

    public void create(ComponentDetails user){
        dao.create(user);
    }


    public void delete(Integer id){
        ComponentDetails user =new ComponentDetails();
        user.setId(id);
        getDao().delete(user);
    }

    public ComponentDetails load(Integer id){
         return getDao().find(id,false);
    }

    public List<ComponentDetails> listPag(int startPage, int resPerPage) {
        return getDao().listPag(startPage, resPerPage);
    }

    public List<ComponentDetails> listPag(int startPage, int resPerPage, String orderCol, boolean asc, Object... otherItems) {
        return getDao().listPag(startPage, resPerPage,orderCol, asc, otherItems);
    }

    public List<ComponentDetails> list() {
        return getDao().findAll();
    }

    public List<ComponentDetails> listPagFilter(int startPage, int resPerPage, String filter) {
        return getDao().listPagFilter(startPage, resPerPage, filter);
    }

    public int no(String filter) {
        return getDao().no(filter);
    }

    public void update(ComponentDetails entity) {
        getDao().update(entity);
    }
}
